package wlf.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.security.auth.Subject;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import wlf.pojo.Admin;
import wlf.pojo.Menu;
import wlf.service.MenuService;

@Controller
public class MenuController {
	@Resource
	private MenuService menuServiceImpl;
	
	@ResponseBody
	@RequestMapping("/showMenu")
	@RequiresPermissions("admin:select")
	public List<Menu> showMenu(Admin admin){
		List<Menu> list = menuServiceImpl.selMenuByAdmin(admin);
		return list;
	}
}
